﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.FC.Domain.DomainObject.System;
using WMS.FC.Domain.DomainObject.Tasks;

namespace WMS.FC.Domain.Service.Tasks.Interface
{
    public interface ITaskService
    {
        /// <summary>
        /// 开始任务
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> StartTask(TaskDO taskEntity, UserInfo userInfo);

        /// <summary>
        /// 设置任务等待
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> SetTaskWaiting(TaskDO taskEntity, UserInfo userInfo);

        /// <summary>
        /// 部分完成任务
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> PartFinishTask(TaskDO taskEntity, UserInfo userInfo);

        /// <summary>
        /// 设置任务失败
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> FailTask(TaskDO taskEntity, UserInfo userInfo);

        /// <summary>
        /// 完成任务
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> FinishTask(TaskDO taskEntity, UserInfo userInfo);

        /// <summary>
        /// 回收任务
        /// </summary>
        /// <param name="taskEntity"></param>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        Task<ActionResultBase> RollbackTask(TaskDO taskEntity, UserInfo userInfo);
    }
}
